//    IAIK SHA3 Provider, a Java-library containing SHA3 candidate implementations  
//    Copyright (C) 2012 Stiftung Secure Information and Communication Technologies SIC 
//                       http://jce.iaik.tugraz.at
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
package com.google.bitcoin.core;

/**
 * Base class for all Groestl implementations optimized for 32-bit.
 * 
 * @author Christian Hanser
 */
abstract class RawGroestl32Bit extends RawGroestl {

  // some constants
  private static final int BYTE_MASK = 0xFF;
  private static final int ROWS = 8;

  //@formatter:off
  private final static int[] T = {  
    0xc632f4a5,0xf86f9784,0xee5eb099,0xf67a8c8d,0xffe8170d,0xd60adcbd,0xde16c8b1,0x916dfc54,0x6090f050,0x02070503,0xce2ee0a9,0x56d1877d,0xe7cc2b19,0xb513a662,0x4d7c31e6,0xec59b59a,0x8f40cf45,0x1fa3bc9d,0x8949c040,0xfa689287,0xefd03f15,0xb29426eb,0x8ece40c9,0xfbe61d0b,0x416e2fec,0xb31aa967,0x5f431cfd,0x456025ea,0x23f9dabf,0x535102f7,0xe445a196,0x9b76ed5b,0x75285dc2,0xe1c5241c,0x3dd4e9ae,0x4cf2be6a,0x6c82ee5a,0x7ebdc341,0xf5f30602,0x8352d14f,0x688ce45c,0x515607f4,0xd18d5c34,0xf9e11808,0xe24cae93,0xab3e9573,0x6297f553,0x2a6b413f,0x081c140c,0x9563f652,0x46e9af65,0x9d7fe25e,0x30487828,0x37cff8a1,0x0a1b110f,0x2febc4b5,0x0e151b09,0x247e5a36,0x1badb69b,0xdf98473d,0xcda76a26,0x4ef5bb69,0x7f334ccd,0xea50ba9f,0x123f2d1b,0x1da4b99e,0x58c49c74,0x3446722e,0x3641772d,0xdc11cdb2,0xb49d29ee,0x5b4d16fb,0xa4a501f6,0x76a1d74d,0xb714a361,0x7d3449ce,0x52df8d7b,0xdd9f423e,0x5ecd9371,0x13b1a297,0xa6a204f5,0xb901b868,0x00000000,0xc1b5742c,0x40e0a060,0xe3c2211f,0x793a43c8,0xb69a2ced,0xd40dd9be,0x8d47ca46,0x671770d9,0x72afdd4b,0x94ed79de,0x98ff67d4,0xb09323e8,0x855bde4a,0xbb06bd6b,0xc5bb7e2a,0x4f7b34e5,0xedd73a16,0x86d254c5,0x9af862d7,0x6699ff55,0x11b6a794,0x8ac04acf,0xe9d93010,0x040e0a06,0xfe669881,0xa0ab0bf0,0x78b4cc44,0x25f0d5ba,0x4b753ee3,0xa2ac0ef3,0x5d4419fe,0x80db5bc0,0x0580858a,0x3fd3ecad,0x21fedfbc,0x70a8d848,0xf1fd0c04,0x63197adf,0x772f58c1,0xaf309f75,0x42e7a563,0x20705030,0xe5cb2e1a,0xfdef120e,0xbf08b76d,0x8155d44c,0x18243c14,0x26795f35,0xc3b2712f,0xbe8638e1,0x35c8fda2,0x88c74fcc,0x2e654b39,0x936af957,0x55580df2,0xfc619d82,0x7ab3c947,0xc827efac,0xba8832e7,0x324f7d2b,0xe642a495,0xc03bfba0,0x19aab398,0x9ef668d1,0xa322817f,0x44eeaa66,0x54d6827e,0x3bdde6ab,0x0b959e83,0x8cc945ca,0xc7bc7b29,0x6b056ed3,0x286c443c,0xa72c8b79,0xbc813de2,0x1631271d,0xad379a76,0xdb964d3b,0x649efa56,0x74a6d24e,0x1436221e,0x92e476db,0x0c121e0a,0x48fcb46c,0xb88f37e4,0x9f78e75d,0xbd0fb26e,0x43692aef,0xc435f1a6,0x39dae3a8,0x31c6f7a4,0xd38a5937,0xf274868b,0xd5835632,0x8b4ec543,0x6e85eb59,0xda18c2b7,0x018e8f8c,0xb11dac64,0x9cf16dd2,0x49723be0,0xd81fc7b4,0xacb915fa,0xf3fa0907,0xcfa06f25,0xca20eaaf,0xf47d898e,0x476720e9,0x10382818,0x6f0b64d5,0xf0738388,0x4afbb16f,0x5cca9672,0x38546c24,0x575f08f1,0x732152c7,0x9764f351,0xcbae6523,0xa125847c,0xe857bf9c,0x3e5d6321,0x96ea7cdd,0x611e7fdc,0x0d9c9186,0x0f9b9485,0xe04bab90,0x7cbac642,0x712657c4,0xcc29e5aa,0x90e373d8,0x06090f05,0xf7f40301,0x1c2a3612,0xc23cfea3,0x6a8be15f,0xaebe10f9,0x69026bd0,0x17bfa891,0x9971e858,0x3a536927,0x27f7d0b9,0xd9914838,0xebde3513,0x2be5ceb3,0x22775533,0xd204d6bb,0xa9399070,0x07878089,0x33c1f2a7,0x2decc1b6,0x3c5a6622,0x15b8ad92,0xc9a96020,0x875cdb49,0xaab01aff,0x50d88878,0xa52b8e7a,0x03898a8f,0x594a13f8,0x09929b80,0x1a233917,0x651075da,0xd7845331,0x84d551c6,0xd003d3b8,0x82dc5ec3,0x29e2cbb0,0x5ac39977,0x1e2d3311,0x7b3d46cb,0xa8b71ffc,0x6d0c61d6,0x2c624e3a,
    0xc6c632f4,0xf8f86f97,0xeeee5eb0,0xf6f67a8c,0xffffe817,0xd6d60adc,0xdede16c8,0x91916dfc,0x606090f0,0x02020705,0xcece2ee0,0x5656d187,0xe7e7cc2b,0xb5b513a6,0x4d4d7c31,0xecec59b5,0x8f8f40cf,0x1f1fa3bc,0x898949c0,0xfafa6892,0xefefd03f,0xb2b29426,0x8e8ece40,0xfbfbe61d,0x41416e2f,0xb3b31aa9,0x5f5f431c,0x45456025,0x2323f9da,0x53535102,0xe4e445a1,0x9b9b76ed,0x7575285d,0xe1e1c524,0x3d3dd4e9,0x4c4cf2be,0x6c6c82ee,0x7e7ebdc3,0xf5f5f306,0x838352d1,0x68688ce4,0x51515607,0xd1d18d5c,0xf9f9e118,0xe2e24cae,0xabab3e95,0x626297f5,0x2a2a6b41,0x08081c14,0x959563f6,0x4646e9af,0x9d9d7fe2,0x30304878,0x3737cff8,0x0a0a1b11,0x2f2febc4,0x0e0e151b,0x24247e5a,0x1b1badb6,0xdfdf9847,0xcdcda76a,0x4e4ef5bb,0x7f7f334c,0xeaea50ba,0x12123f2d,0x1d1da4b9,0x5858c49c,0x34344672,0x36364177,0xdcdc11cd,0xb4b49d29,0x5b5b4d16,0xa4a4a501,0x7676a1d7,0xb7b714a3,0x7d7d3449,0x5252df8d,0xdddd9f42,0x5e5ecd93,0x1313b1a2,0xa6a6a204,0xb9b901b8,0x00000000,0xc1c1b574,0x4040e0a0,0xe3e3c221,0x79793a43,0xb6b69a2c,0xd4d40dd9,0x8d8d47ca,0x67671770,0x7272afdd,0x9494ed79,0x9898ff67,0xb0b09323,0x85855bde,0xbbbb06bd,0xc5c5bb7e,0x4f4f7b34,0xededd73a,0x8686d254,0x9a9af862,0x666699ff,0x1111b6a7,0x8a8ac04a,0xe9e9d930,0x04040e0a,0xfefe6698,0xa0a0ab0b,0x7878b4cc,0x2525f0d5,0x4b4b753e,0xa2a2ac0e,0x5d5d4419,0x8080db5b,0x05058085,0x3f3fd3ec,0x2121fedf,0x7070a8d8,0xf1f1fd0c,0x6363197a,0x77772f58,0xafaf309f,0x4242e7a5,0x20207050,0xe5e5cb2e,0xfdfdef12,0xbfbf08b7,0x818155d4,0x1818243c,0x2626795f,0xc3c3b271,0xbebe8638,0x3535c8fd,0x8888c74f,0x2e2e654b,0x93936af9,0x5555580d,0xfcfc619d,0x7a7ab3c9,0xc8c827ef,0xbaba8832,0x32324f7d,0xe6e642a4,0xc0c03bfb,0x1919aab3,0x9e9ef668,0xa3a32281,0x4444eeaa,0x5454d682,0x3b3bdde6,0x0b0b959e,0x8c8cc945,0xc7c7bc7b,0x6b6b056e,0x28286c44,0xa7a72c8b,0xbcbc813d,0x16163127,0xadad379a,0xdbdb964d,0x64649efa,0x7474a6d2,0x14143622,0x9292e476,0x0c0c121e,0x4848fcb4,0xb8b88f37,0x9f9f78e7,0xbdbd0fb2,0x4343692a,0xc4c435f1,0x3939dae3,0x3131c6f7,0xd3d38a59,0xf2f27486,0xd5d58356,0x8b8b4ec5,0x6e6e85eb,0xdada18c2,0x01018e8f,0xb1b11dac,0x9c9cf16d,0x4949723b,0xd8d81fc7,0xacacb915,0xf3f3fa09,0xcfcfa06f,0xcaca20ea,0xf4f47d89,0x47476720,0x10103828,0x6f6f0b64,0xf0f07383,0x4a4afbb1,0x5c5cca96,0x3838546c,0x57575f08,0x73732152,0x979764f3,0xcbcbae65,0xa1a12584,0xe8e857bf,0x3e3e5d63,0x9696ea7c,0x61611e7f,0x0d0d9c91,0x0f0f9b94,0xe0e04bab,0x7c7cbac6,0x71712657,0xcccc29e5,0x9090e373,0x0606090f,0xf7f7f403,0x1c1c2a36,0xc2c23cfe,0x6a6a8be1,0xaeaebe10,0x6969026b,0x1717bfa8,0x999971e8,0x3a3a5369,0x2727f7d0,0xd9d99148,0xebebde35,0x2b2be5ce,0x22227755,0xd2d204d6,0xa9a93990,0x07078780,0x3333c1f2,0x2d2decc1,0x3c3c5a66,0x1515b8ad,0xc9c9a960,0x87875cdb,0xaaaab01a,0x5050d888,0xa5a52b8e,0x0303898a,0x59594a13,0x0909929b,0x1a1a2339,0x65651075,0xd7d78453,0x8484d551,0xd0d003d3,0x8282dc5e,0x2929e2cb,0x5a5ac399,0x1e1e2d33,0x7b7b3d46,0xa8a8b71f,0x6d6d0c61,0x2c2c624e,
    0xa5c6c632,0x84f8f86f,0x99eeee5e,0x8df6f67a,0x0dffffe8,0xbdd6d60a,0xb1dede16,0x5491916d,0x50606090,0x03020207,0xa9cece2e,0x7d5656d1,0x19e7e7cc,0x62b5b513,0xe64d4d7c,0x9aecec59,0x458f8f40,0x9d1f1fa3,0x40898949,0x87fafa68,0x15efefd0,0xebb2b294,0xc98e8ece,0x0bfbfbe6,0xec41416e,0x67b3b31a,0xfd5f5f43,0xea454560,0xbf2323f9,0xf7535351,0x96e4e445,0x5b9b9b76,0xc2757528,0x1ce1e1c5,0xae3d3dd4,0x6a4c4cf2,0x5a6c6c82,0x417e7ebd,0x02f5f5f3,0x4f838352,0x5c68688c,0xf4515156,0x34d1d18d,0x08f9f9e1,0x93e2e24c,0x73abab3e,0x53626297,0x3f2a2a6b,0x0c08081c,0x52959563,0x654646e9,0x5e9d9d7f,0x28303048,0xa13737cf,0x0f0a0a1b,0xb52f2feb,0x090e0e15,0x3624247e,0x9b1b1bad,0x3ddfdf98,0x26cdcda7,0x694e4ef5,0xcd7f7f33,0x9feaea50,0x1b12123f,0x9e1d1da4,0x745858c4,0x2e343446,0x2d363641,0xb2dcdc11,0xeeb4b49d,0xfb5b5b4d,0xf6a4a4a5,0x4d7676a1,0x61b7b714,0xce7d7d34,0x7b5252df,0x3edddd9f,0x715e5ecd,0x971313b1,0xf5a6a6a2,0x68b9b901,0x00000000,0x2cc1c1b5,0x604040e0,0x1fe3e3c2,0xc879793a,0xedb6b69a,0xbed4d40d,0x468d8d47,0xd9676717,0x4b7272af,0xde9494ed,0xd49898ff,0xe8b0b093,0x4a85855b,0x6bbbbb06,0x2ac5c5bb,0xe54f4f7b,0x16ededd7,0xc58686d2,0xd79a9af8,0x55666699,0x941111b6,0xcf8a8ac0,0x10e9e9d9,0x0604040e,0x81fefe66,0xf0a0a0ab,0x447878b4,0xba2525f0,0xe34b4b75,0xf3a2a2ac,0xfe5d5d44,0xc08080db,0x8a050580,0xad3f3fd3,0xbc2121fe,0x487070a8,0x04f1f1fd,0xdf636319,0xc177772f,0x75afaf30,0x634242e7,0x30202070,0x1ae5e5cb,0x0efdfdef,0x6dbfbf08,0x4c818155,0x14181824,0x35262679,0x2fc3c3b2,0xe1bebe86,0xa23535c8,0xcc8888c7,0x392e2e65,0x5793936a,0xf2555558,0x82fcfc61,0x477a7ab3,0xacc8c827,0xe7baba88,0x2b32324f,0x95e6e642,0xa0c0c03b,0x981919aa,0xd19e9ef6,0x7fa3a322,0x664444ee,0x7e5454d6,0xab3b3bdd,0x830b0b95,0xca8c8cc9,0x29c7c7bc,0xd36b6b05,0x3c28286c,0x79a7a72c,0xe2bcbc81,0x1d161631,0x76adad37,0x3bdbdb96,0x5664649e,0x4e7474a6,0x1e141436,0xdb9292e4,0x0a0c0c12,0x6c4848fc,0xe4b8b88f,0x5d9f9f78,0x6ebdbd0f,0xef434369,0xa6c4c435,0xa83939da,0xa43131c6,0x37d3d38a,0x8bf2f274,0x32d5d583,0x438b8b4e,0x596e6e85,0xb7dada18,0x8c01018e,0x64b1b11d,0xd29c9cf1,0xe0494972,0xb4d8d81f,0xfaacacb9,0x07f3f3fa,0x25cfcfa0,0xafcaca20,0x8ef4f47d,0xe9474767,0x18101038,0xd56f6f0b,0x88f0f073,0x6f4a4afb,0x725c5cca,0x24383854,0xf157575f,0xc7737321,0x51979764,0x23cbcbae,0x7ca1a125,0x9ce8e857,0x213e3e5d,0xdd9696ea,0xdc61611e,0x860d0d9c,0x850f0f9b,0x90e0e04b,0x427c7cba,0xc4717126,0xaacccc29,0xd89090e3,0x05060609,0x01f7f7f4,0x121c1c2a,0xa3c2c23c,0x5f6a6a8b,0xf9aeaebe,0xd0696902,0x911717bf,0x58999971,0x273a3a53,0xb92727f7,0x38d9d991,0x13ebebde,0xb32b2be5,0x33222277,0xbbd2d204,0x70a9a939,0x89070787,0xa73333c1,0xb62d2dec,0x223c3c5a,0x921515b8,0x20c9c9a9,0x4987875c,0xffaaaab0,0x785050d8,0x7aa5a52b,0x8f030389,0xf859594a,0x80090992,0x171a1a23,0xda656510,0x31d7d784,0xc68484d5,0xb8d0d003,0xc38282dc,0xb02929e2,0x775a5ac3,0x111e1e2d,0xcb7b7b3d,0xfca8a8b7,0xd66d6d0c,0x3a2c2c62,
    0x97a5c6c6,0xeb84f8f8,0xc799eeee,0xf78df6f6,0xe50dffff,0xb7bdd6d6,0xa7b1dede,0x39549191,0xc0506060,0x04030202,0x87a9cece,0xac7d5656,0xd519e7e7,0x7162b5b5,0x9ae64d4d,0xc39aecec,0x05458f8f,0x3e9d1f1f,0x09408989,0xef87fafa,0xc515efef,0x7febb2b2,0x07c98e8e,0xed0bfbfb,0x82ec4141,0x7d67b3b3,0xbefd5f5f,0x8aea4545,0x46bf2323,0xa6f75353,0xd396e4e4,0x2d5b9b9b,0xeac27575,0xd91ce1e1,0x7aae3d3d,0x986a4c4c,0xd85a6c6c,0xfc417e7e,0xf102f5f5,0x1d4f8383,0xd05c6868,0xa2f45151,0xb934d1d1,0xe908f9f9,0xdf93e2e2,0x4d73abab,0xc4536262,0x543f2a2a,0x100c0808,0x31529595,0x8c654646,0x215e9d9d,0x60283030,0x6ea13737,0x140f0a0a,0x5eb52f2f,0x1c090e0e,0x48362424,0x369b1b1b,0xa53ddfdf,0x8126cdcd,0x9c694e4e,0xfecd7f7f,0xcf9feaea,0x241b1212,0x3a9e1d1d,0xb0745858,0x682e3434,0x6c2d3636,0xa3b2dcdc,0x73eeb4b4,0xb6fb5b5b,0x53f6a4a4,0xec4d7676,0x7561b7b7,0xface7d7d,0xa47b5252,0xa13edddd,0xbc715e5e,0x26971313,0x57f5a6a6,0x6968b9b9,0x00000000,0x992cc1c1,0x80604040,0xdd1fe3e3,0xf2c87979,0x77edb6b6,0xb3bed4d4,0x01468d8d,0xced96767,0xe44b7272,0x33de9494,0x2bd49898,0x7be8b0b0,0x114a8585,0x6d6bbbbb,0x912ac5c5,0x9ee54f4f,0xc116eded,0x17c58686,0x2fd79a9a,0xcc556666,0x22941111,0x0fcf8a8a,0xc910e9e9,0x08060404,0xe781fefe,0x5bf0a0a0,0xf0447878,0x4aba2525,0x96e34b4b,0x5ff3a2a2,0xbafe5d5d,0x1bc08080,0x0a8a0505,0x7ead3f3f,0x42bc2121,0xe0487070,0xf904f1f1,0xc6df6363,0xeec17777,0x4575afaf,0x84634242,0x40302020,0xd11ae5e5,0xe10efdfd,0x656dbfbf,0x194c8181,0x30141818,0x4c352626,0x9d2fc3c3,0x67e1bebe,0x6aa23535,0x0bcc8888,0x5c392e2e,0x3d579393,0xaaf25555,0xe382fcfc,0xf4477a7a,0x8bacc8c8,0x6fe7baba,0x642b3232,0xd795e6e6,0x9ba0c0c0,0x32981919,0x27d19e9e,0x5d7fa3a3,0x88664444,0xa87e5454,0x76ab3b3b,0x16830b0b,0x03ca8c8c,0x9529c7c7,0xd6d36b6b,0x503c2828,0x5579a7a7,0x63e2bcbc,0x2c1d1616,0x4176adad,0xad3bdbdb,0xc8566464,0xe84e7474,0x281e1414,0x3fdb9292,0x180a0c0c,0x906c4848,0x6be4b8b8,0x255d9f9f,0x616ebdbd,0x86ef4343,0x93a6c4c4,0x72a83939,0x62a43131,0xbd37d3d3,0xff8bf2f2,0xb132d5d5,0x0d438b8b,0xdc596e6e,0xafb7dada,0x028c0101,0x7964b1b1,0x23d29c9c,0x92e04949,0xabb4d8d8,0x43faacac,0xfd07f3f3,0x8525cfcf,0x8fafcaca,0xf38ef4f4,0x8ee94747,0x20181010,0xded56f6f,0xfb88f0f0,0x946f4a4a,0xb8725c5c,0x70243838,0xaef15757,0xe6c77373,0x35519797,0x8d23cbcb,0x597ca1a1,0xcb9ce8e8,0x7c213e3e,0x37dd9696,0xc2dc6161,0x1a860d0d,0x1e850f0f,0xdb90e0e0,0xf8427c7c,0xe2c47171,0x83aacccc,0x3bd89090,0x0c050606,0xf501f7f7,0x38121c1c,0x9fa3c2c2,0xd45f6a6a,0x47f9aeae,0xd2d06969,0x2e911717,0x29589999,0x74273a3a,0x4eb92727,0xa938d9d9,0xcd13ebeb,0x56b32b2b,0x44332222,0xbfbbd2d2,0x4970a9a9,0x0e890707,0x66a73333,0x5ab62d2d,0x78223c3c,0x2a921515,0x8920c9c9,0x15498787,0x4fffaaaa,0xa0785050,0x517aa5a5,0x068f0303,0xb2f85959,0x12800909,0x34171a1a,0xcada6565,0xb531d7d7,0x13c68484,0xbbb8d0d0,0x1fc38282,0x52b02929,0xb4775a5a,0x3c111e1e,0xf6cb7b7b,0x4bfca8a8,0xdad66d6d,0x583a2c2c,
    0xf497a5c6,0x97eb84f8,0xb0c799ee,0x8cf78df6,0x17e50dff,0xdcb7bdd6,0xc8a7b1de,0xfc395491,0xf0c05060,0x05040302,0xe087a9ce,0x87ac7d56,0x2bd519e7,0xa67162b5,0x319ae64d,0xb5c39aec,0xcf05458f,0xbc3e9d1f,0xc0094089,0x92ef87fa,0x3fc515ef,0x267febb2,0x4007c98e,0x1ded0bfb,0x2f82ec41,0xa97d67b3,0x1cbefd5f,0x258aea45,0xda46bf23,0x02a6f753,0xa1d396e4,0xed2d5b9b,0x5deac275,0x24d91ce1,0xe97aae3d,0xbe986a4c,0xeed85a6c,0xc3fc417e,0x06f102f5,0xd11d4f83,0xe4d05c68,0x07a2f451,0x5cb934d1,0x18e908f9,0xaedf93e2,0x954d73ab,0xf5c45362,0x41543f2a,0x14100c08,0xf6315295,0xaf8c6546,0xe2215e9d,0x78602830,0xf86ea137,0x11140f0a,0xc45eb52f,0x1b1c090e,0x5a483624,0xb6369b1b,0x47a53ddf,0x6a8126cd,0xbb9c694e,0x4cfecd7f,0xbacf9fea,0x2d241b12,0xb93a9e1d,0x9cb07458,0x72682e34,0x776c2d36,0xcda3b2dc,0x2973eeb4,0x16b6fb5b,0x0153f6a4,0xd7ec4d76,0xa37561b7,0x49face7d,0x8da47b52,0x42a13edd,0x93bc715e,0xa2269713,0x0457f5a6,0xb86968b9,0x00000000,0x74992cc1,0xa0806040,0x21dd1fe3,0x43f2c879,0x2c77edb6,0xd9b3bed4,0xca01468d,0x70ced967,0xdde44b72,0x7933de94,0x672bd498,0x237be8b0,0xde114a85,0xbd6d6bbb,0x7e912ac5,0x349ee54f,0x3ac116ed,0x5417c586,0x622fd79a,0xffcc5566,0xa7229411,0x4a0fcf8a,0x30c910e9,0x0a080604,0x98e781fe,0x0b5bf0a0,0xccf04478,0xd54aba25,0x3e96e34b,0x0e5ff3a2,0x19bafe5d,0x5b1bc080,0x850a8a05,0xec7ead3f,0xdf42bc21,0xd8e04870,0x0cf904f1,0x7ac6df63,0x58eec177,0x9f4575af,0xa5846342,0x50403020,0x2ed11ae5,0x12e10efd,0xb7656dbf,0xd4194c81,0x3c301418,0x5f4c3526,0x719d2fc3,0x3867e1be,0xfd6aa235,0x4f0bcc88,0x4b5c392e,0xf93d5793,0x0daaf255,0x9de382fc,0xc9f4477a,0xef8bacc8,0x326fe7ba,0x7d642b32,0xa4d795e6,0xfb9ba0c0,0xb3329819,0x6827d19e,0x815d7fa3,0xaa886644,0x82a87e54,0xe676ab3b,0x9e16830b,0x4503ca8c,0x7b9529c7,0x6ed6d36b,0x44503c28,0x8b5579a7,0x3d63e2bc,0x272c1d16,0x9a4176ad,0x4dad3bdb,0xfac85664,0xd2e84e74,0x22281e14,0x763fdb92,0x1e180a0c,0xb4906c48,0x376be4b8,0xe7255d9f,0xb2616ebd,0x2a86ef43,0xf193a6c4,0xe372a839,0xf762a431,0x59bd37d3,0x86ff8bf2,0x56b132d5,0xc50d438b,0xebdc596e,0xc2afb7da,0x8f028c01,0xac7964b1,0x6d23d29c,0x3b92e049,0xc7abb4d8,0x1543faac,0x09fd07f3,0x6f8525cf,0xea8fafca,0x89f38ef4,0x208ee947,0x28201810,0x64ded56f,0x83fb88f0,0xb1946f4a,0x96b8725c,0x6c702438,0x08aef157,0x52e6c773,0xf3355197,0x658d23cb,0x84597ca1,0xbfcb9ce8,0x637c213e,0x7c37dd96,0x7fc2dc61,0x911a860d,0x941e850f,0xabdb90e0,0xc6f8427c,0x57e2c471,0xe583aacc,0x733bd890,0x0f0c0506,0x03f501f7,0x3638121c,0xfe9fa3c2,0xe1d45f6a,0x1047f9ae,0x6bd2d069,0xa82e9117,0xe8295899,0x6974273a,0xd04eb927,0x48a938d9,0x35cd13eb,0xce56b32b,0x55443322,0xd6bfbbd2,0x904970a9,0x800e8907,0xf266a733,0xc15ab62d,0x6678223c,0xad2a9215,0x608920c9,0xdb154987,0x1a4fffaa,0x88a07850,0x8e517aa5,0x8a068f03,0x13b2f859,0x9b128009,0x3934171a,0x75cada65,0x53b531d7,0x5113c684,0xd3bbb8d0,0x5e1fc382,0xcb52b029,0x99b4775a,0x333c111e,0x46f6cb7b,0x1f4bfca8,0x61dad66d,0x4e583a2c,
    0xa5f497a5,0x8497eb84,0x99b0c799,0x8d8cf78d,0x0d17e50d,0xbddcb7bd,0xb1c8a7b1,0x54fc3954,0x50f0c050,0x03050403,0xa9e087a9,0x7d87ac7d,0x192bd519,0x62a67162,0xe6319ae6,0x9ab5c39a,0x45cf0545,0x9dbc3e9d,0x40c00940,0x8792ef87,0x153fc515,0xeb267feb,0xc94007c9,0x0b1ded0b,0xec2f82ec,0x67a97d67,0xfd1cbefd,0xea258aea,0xbfda46bf,0xf702a6f7,0x96a1d396,0x5bed2d5b,0xc25deac2,0x1c24d91c,0xaee97aae,0x6abe986a,0x5aeed85a,0x41c3fc41,0x0206f102,0x4fd11d4f,0x5ce4d05c,0xf407a2f4,0x345cb934,0x0818e908,0x93aedf93,0x73954d73,0x53f5c453,0x3f41543f,0x0c14100c,0x52f63152,0x65af8c65,0x5ee2215e,0x28786028,0xa1f86ea1,0x0f11140f,0xb5c45eb5,0x091b1c09,0x365a4836,0x9bb6369b,0x3d47a53d,0x266a8126,0x69bb9c69,0xcd4cfecd,0x9fbacf9f,0x1b2d241b,0x9eb93a9e,0x749cb074,0x2e72682e,0x2d776c2d,0xb2cda3b2,0xee2973ee,0xfb16b6fb,0xf60153f6,0x4dd7ec4d,0x61a37561,0xce49face,0x7b8da47b,0x3e42a13e,0x7193bc71,0x97a22697,0xf50457f5,0x68b86968,0x00000000,0x2c74992c,0x60a08060,0x1f21dd1f,0xc843f2c8,0xed2c77ed,0xbed9b3be,0x46ca0146,0xd970ced9,0x4bdde44b,0xde7933de,0xd4672bd4,0xe8237be8,0x4ade114a,0x6bbd6d6b,0x2a7e912a,0xe5349ee5,0x163ac116,0xc55417c5,0xd7622fd7,0x55ffcc55,0x94a72294,0xcf4a0fcf,0x1030c910,0x060a0806,0x8198e781,0xf00b5bf0,0x44ccf044,0xbad54aba,0xe33e96e3,0xf30e5ff3,0xfe19bafe,0xc05b1bc0,0x8a850a8a,0xadec7ead,0xbcdf42bc,0x48d8e048,0x040cf904,0xdf7ac6df,0xc158eec1,0x759f4575,0x63a58463,0x30504030,0x1a2ed11a,0x0e12e10e,0x6db7656d,0x4cd4194c,0x143c3014,0x355f4c35,0x2f719d2f,0xe13867e1,0xa2fd6aa2,0xcc4f0bcc,0x394b5c39,0x57f93d57,0xf20daaf2,0x829de382,0x47c9f447,0xacef8bac,0xe7326fe7,0x2b7d642b,0x95a4d795,0xa0fb9ba0,0x98b33298,0xd16827d1,0x7f815d7f,0x66aa8866,0x7e82a87e,0xabe676ab,0x839e1683,0xca4503ca,0x297b9529,0xd36ed6d3,0x3c44503c,0x798b5579,0xe23d63e2,0x1d272c1d,0x769a4176,0x3b4dad3b,0x56fac856,0x4ed2e84e,0x1e22281e,0xdb763fdb,0x0a1e180a,0x6cb4906c,0xe4376be4,0x5de7255d,0x6eb2616e,0xef2a86ef,0xa6f193a6,0xa8e372a8,0xa4f762a4,0x3759bd37,0x8b86ff8b,0x3256b132,0x43c50d43,0x59ebdc59,0xb7c2afb7,0x8c8f028c,0x64ac7964,0xd26d23d2,0xe03b92e0,0xb4c7abb4,0xfa1543fa,0x0709fd07,0x256f8525,0xafea8faf,0x8e89f38e,0xe9208ee9,0x18282018,0xd564ded5,0x8883fb88,0x6fb1946f,0x7296b872,0x246c7024,0xf108aef1,0xc752e6c7,0x51f33551,0x23658d23,0x7c84597c,0x9cbfcb9c,0x21637c21,0xdd7c37dd,0xdc7fc2dc,0x86911a86,0x85941e85,0x90abdb90,0x42c6f842,0xc457e2c4,0xaae583aa,0xd8733bd8,0x050f0c05,0x0103f501,0x12363812,0xa3fe9fa3,0x5fe1d45f,0xf91047f9,0xd06bd2d0,0x91a82e91,0x58e82958,0x27697427,0xb9d04eb9,0x3848a938,0x1335cd13,0xb3ce56b3,0x33554433,0xbbd6bfbb,0x70904970,0x89800e89,0xa7f266a7,0xb6c15ab6,0x22667822,0x92ad2a92,0x20608920,0x49db1549,0xff1a4fff,0x7888a078,0x7a8e517a,0x8f8a068f,0xf813b2f8,0x809b1280,0x17393417,0xda75cada,0x3153b531,0xc65113c6,0xb8d3bbb8,0xc35e1fc3,0xb0cb52b0,0x7799b477,0x11333c11,0xcb46f6cb,0xfc1f4bfc,0xd661dad6,0x3a4e583a,
    0xf4a5f497,0x978497eb,0xb099b0c7,0x8c8d8cf7,0x170d17e5,0xdcbddcb7,0xc8b1c8a7,0xfc54fc39,0xf050f0c0,0x05030504,0xe0a9e087,0x877d87ac,0x2b192bd5,0xa662a671,0x31e6319a,0xb59ab5c3,0xcf45cf05,0xbc9dbc3e,0xc040c009,0x928792ef,0x3f153fc5,0x26eb267f,0x40c94007,0x1d0b1ded,0x2fec2f82,0xa967a97d,0x1cfd1cbe,0x25ea258a,0xdabfda46,0x02f702a6,0xa196a1d3,0xed5bed2d,0x5dc25dea,0x241c24d9,0xe9aee97a,0xbe6abe98,0xee5aeed8,0xc341c3fc,0x060206f1,0xd14fd11d,0xe45ce4d0,0x07f407a2,0x5c345cb9,0x180818e9,0xae93aedf,0x9573954d,0xf553f5c4,0x413f4154,0x140c1410,0xf652f631,0xaf65af8c,0xe25ee221,0x78287860,0xf8a1f86e,0x110f1114,0xc4b5c45e,0x1b091b1c,0x5a365a48,0xb69bb636,0x473d47a5,0x6a266a81,0xbb69bb9c,0x4ccd4cfe,0xba9fbacf,0x2d1b2d24,0xb99eb93a,0x9c749cb0,0x722e7268,0x772d776c,0xcdb2cda3,0x29ee2973,0x16fb16b6,0x01f60153,0xd74dd7ec,0xa361a375,0x49ce49fa,0x8d7b8da4,0x423e42a1,0x937193bc,0xa297a226,0x04f50457,0xb868b869,0x00000000,0x742c7499,0xa060a080,0x211f21dd,0x43c843f2,0x2ced2c77,0xd9bed9b3,0xca46ca01,0x70d970ce,0xdd4bdde4,0x79de7933,0x67d4672b,0x23e8237b,0xde4ade11,0xbd6bbd6d,0x7e2a7e91,0x34e5349e,0x3a163ac1,0x54c55417,0x62d7622f,0xff55ffcc,0xa794a722,0x4acf4a0f,0x301030c9,0x0a060a08,0x988198e7,0x0bf00b5b,0xcc44ccf0,0xd5bad54a,0x3ee33e96,0x0ef30e5f,0x19fe19ba,0x5bc05b1b,0x858a850a,0xecadec7e,0xdfbcdf42,0xd848d8e0,0x0c040cf9,0x7adf7ac6,0x58c158ee,0x9f759f45,0xa563a584,0x50305040,0x2e1a2ed1,0x120e12e1,0xb76db765,0xd44cd419,0x3c143c30,0x5f355f4c,0x712f719d,0x38e13867,0xfda2fd6a,0x4fcc4f0b,0x4b394b5c,0xf957f93d,0x0df20daa,0x9d829de3,0xc947c9f4,0xefacef8b,0x32e7326f,0x7d2b7d64,0xa495a4d7,0xfba0fb9b,0xb398b332,0x68d16827,0x817f815d,0xaa66aa88,0x827e82a8,0xe6abe676,0x9e839e16,0x45ca4503,0x7b297b95,0x6ed36ed6,0x443c4450,0x8b798b55,0x3de23d63,0x271d272c,0x9a769a41,0x4d3b4dad,0xfa56fac8,0xd24ed2e8,0x221e2228,0x76db763f,0x1e0a1e18,0xb46cb490,0x37e4376b,0xe75de725,0xb26eb261,0x2aef2a86,0xf1a6f193,0xe3a8e372,0xf7a4f762,0x593759bd,0x868b86ff,0x563256b1,0xc543c50d,0xeb59ebdc,0xc2b7c2af,0x8f8c8f02,0xac64ac79,0x6dd26d23,0x3be03b92,0xc7b4c7ab,0x15fa1543,0x090709fd,0x6f256f85,0xeaafea8f,0x898e89f3,0x20e9208e,0x28182820,0x64d564de,0x838883fb,0xb16fb194,0x967296b8,0x6c246c70,0x08f108ae,0x52c752e6,0xf351f335,0x6523658d,0x847c8459,0xbf9cbfcb,0x6321637c,0x7cdd7c37,0x7fdc7fc2,0x9186911a,0x9485941e,0xab90abdb,0xc642c6f8,0x57c457e2,0xe5aae583,0x73d8733b,0x0f050f0c,0x030103f5,0x36123638,0xfea3fe9f,0xe15fe1d4,0x10f91047,0x6bd06bd2,0xa891a82e,0xe858e829,0x69276974,0xd0b9d04e,0x483848a9,0x351335cd,0xceb3ce56,0x55335544,0xd6bbd6bf,0x90709049,0x8089800e,0xf2a7f266,0xc1b6c15a,0x66226678,0xad92ad2a,0x60206089,0xdb49db15,0x1aff1a4f,0x887888a0,0x8e7a8e51,0x8a8f8a06,0x13f813b2,0x9b809b12,0x39173934,0x75da75ca,0x533153b5,0x51c65113,0xd3b8d3bb,0x5ec35e1f,0xcbb0cb52,0x997799b4,0x3311333c,0x46cb46f6,0x1ffc1f4b,0x61d661da,0x4e3a4e58,
    0x32f4a5f4,0x6f978497,0x5eb099b0,0x7a8c8d8c,0xe8170d17,0x0adcbddc,0x16c8b1c8,0x6dfc54fc,0x90f050f0,0x07050305,0x2ee0a9e0,0xd1877d87,0xcc2b192b,0x13a662a6,0x7c31e631,0x59b59ab5,0x40cf45cf,0xa3bc9dbc,0x49c040c0,0x68928792,0xd03f153f,0x9426eb26,0xce40c940,0xe61d0b1d,0x6e2fec2f,0x1aa967a9,0x431cfd1c,0x6025ea25,0xf9dabfda,0x5102f702,0x45a196a1,0x76ed5bed,0x285dc25d,0xc5241c24,0xd4e9aee9,0xf2be6abe,0x82ee5aee,0xbdc341c3,0xf3060206,0x52d14fd1,0x8ce45ce4,0x5607f407,0x8d5c345c,0xe1180818,0x4cae93ae,0x3e957395,0x97f553f5,0x6b413f41,0x1c140c14,0x63f652f6,0xe9af65af,0x7fe25ee2,0x48782878,0xcff8a1f8,0x1b110f11,0xebc4b5c4,0x151b091b,0x7e5a365a,0xadb69bb6,0x98473d47,0xa76a266a,0xf5bb69bb,0x334ccd4c,0x50ba9fba,0x3f2d1b2d,0xa4b99eb9,0xc49c749c,0x46722e72,0x41772d77,0x11cdb2cd,0x9d29ee29,0x4d16fb16,0xa501f601,0xa1d74dd7,0x14a361a3,0x3449ce49,0xdf8d7b8d,0x9f423e42,0xcd937193,0xb1a297a2,0xa204f504,0x01b868b8,0x00000000,0xb5742c74,0xe0a060a0,0xc2211f21,0x3a43c843,0x9a2ced2c,0x0dd9bed9,0x47ca46ca,0x1770d970,0xafdd4bdd,0xed79de79,0xff67d467,0x9323e823,0x5bde4ade,0x06bd6bbd,0xbb7e2a7e,0x7b34e534,0xd73a163a,0xd254c554,0xf862d762,0x99ff55ff,0xb6a794a7,0xc04acf4a,0xd9301030,0x0e0a060a,0x66988198,0xab0bf00b,0xb4cc44cc,0xf0d5bad5,0x753ee33e,0xac0ef30e,0x4419fe19,0xdb5bc05b,0x80858a85,0xd3ecadec,0xfedfbcdf,0xa8d848d8,0xfd0c040c,0x197adf7a,0x2f58c158,0x309f759f,0xe7a563a5,0x70503050,0xcb2e1a2e,0xef120e12,0x08b76db7,0x55d44cd4,0x243c143c,0x795f355f,0xb2712f71,0x8638e138,0xc8fda2fd,0xc74fcc4f,0x654b394b,0x6af957f9,0x580df20d,0x619d829d,0xb3c947c9,0x27efacef,0x8832e732,0x4f7d2b7d,0x42a495a4,0x3bfba0fb,0xaab398b3,0xf668d168,0x22817f81,0xeeaa66aa,0xd6827e82,0xdde6abe6,0x959e839e,0xc945ca45,0xbc7b297b,0x056ed36e,0x6c443c44,0x2c8b798b,0x813de23d,0x31271d27,0x379a769a,0x964d3b4d,0x9efa56fa,0xa6d24ed2,0x36221e22,0xe476db76,0x121e0a1e,0xfcb46cb4,0x8f37e437,0x78e75de7,0x0fb26eb2,0x692aef2a,0x35f1a6f1,0xdae3a8e3,0xc6f7a4f7,0x8a593759,0x74868b86,0x83563256,0x4ec543c5,0x85eb59eb,0x18c2b7c2,0x8e8f8c8f,0x1dac64ac,0xf16dd26d,0x723be03b,0x1fc7b4c7,0xb915fa15,0xfa090709,0xa06f256f,0x20eaafea,0x7d898e89,0x6720e920,0x38281828,0x0b64d564,0x73838883,0xfbb16fb1,0xca967296,0x546c246c,0x5f08f108,0x2152c752,0x64f351f3,0xae652365,0x25847c84,0x57bf9cbf,0x5d632163,0xea7cdd7c,0x1e7fdc7f,0x9c918691,0x9b948594,0x4bab90ab,0xbac642c6,0x2657c457,0x29e5aae5,0xe373d873,0x090f050f,0xf4030103,0x2a361236,0x3cfea3fe,0x8be15fe1,0xbe10f910,0x026bd06b,0xbfa891a8,0x71e858e8,0x53692769,0xf7d0b9d0,0x91483848,0xde351335,0xe5ceb3ce,0x77553355,0x04d6bbd6,0x39907090,0x87808980,0xc1f2a7f2,0xecc1b6c1,0x5a662266,0xb8ad92ad,0xa9602060,0x5cdb49db,0xb01aff1a,0xd8887888,0x2b8e7a8e,0x898a8f8a,0x4a13f813,0x929b809b,0x23391739,0x1075da75,0x84533153,0xd551c651,0x03d3b8d3,0xdc5ec35e,0xe2cbb0cb,0xc3997799,0x2d331133,0x3d46cb46,0xb71ffc1f,0x0c61d661,0x624e3a4e };
  //@formatter:on

  // the number of columns
  private final int cols_;

  // the chaining values
  int[] chaining_;

  // helper variable
  byte[] outputTemp_;

  /**
   * Constructs a new instance.
   * 
   * @param digestLength_
   *          the hash length
   * @param cols
   *          the number of internal columns to be used by this variant
   */
  public RawGroestl32Bit(int digestLength, int cols) {
    super(digestLength, ROWS * cols);
    cols_ = cols;
    chaining_ = new int[cols << 1];

    final int length = (digestLength + 7) >>> 3;
    outputTemp_ = new byte[length << 3];
  }

  /**
   * Computes one new state column.
   */
  static void COLUMN(int[] x, int[] y, int i, int c0, int c1, int c2, int c3, int c4, int c5,
      int c6, int c7) {
    y[i] = T[((x[c0] >>> 24) & BYTE_MASK)] ^ T[256 + ((x[c1] >>> 16) & BYTE_MASK)]
        ^ T[512 + ((x[c2] >>> 8) & BYTE_MASK)] ^ T[768 + ((x[c3]) & BYTE_MASK)]
        ^ T[1024 + ((x[c4] >>> 24) & BYTE_MASK)] ^ T[1280 + ((x[c5] >>> 16) & BYTE_MASK)]
        ^ T[1536 + ((x[c6] >>> 8) & BYTE_MASK)] ^ T[1792 + ((x[c7]) & BYTE_MASK)];
  }

  @Override
  public void engineReset() {
    super.engineReset();

    Util.zeroBlock(chaining_);
    Util.zeroBlock(bits_);
    Util.zeroBlock(outputTemp_);
    chaining_[(cols_ << 1) - 1] = digestLength_ << 3;
  }
}
